﻿<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ include file="/WEB-INF/view/include/inc.jsp"%>
<!DOCTYPE html>
<html lang="zh-CN">

<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>系统首页</title>
<!-- Bootstrap -->
<%@ include file="/WEB-INF/view/jQgrid.jsp"%>
<script src="<%=contextPath%>/js/vue.min.js"></script>
</head>

<body>
	<div class="container-fluid" id="content">
		<div class="row-fluid">
			<div class="row">
				<div class="col-sm-12">
					<h3 style="text-align: center;font-size: 24px;margin-top: 20px;">猎头管理工作台</h3>
				</div>
			</div>
			<div class="hr-line-dashed"></div>
			<div class="row">
				<div class="col-sm-12">
				<h3>今日工作</h3>
				<div class="row">
				<div class="col-sm-4 col-xs-2">
					<table class="table">
					  <caption>联系沟通提醒</caption>
					  <thead>
					    <tr>
					      <th>姓名</th>
					      <th>上次沟通时间</th>
					      <th>状态</th></tr>
					  </thead>
					  <tbody>
					  <c:forEach items="${communicates }" var="communicate">
					  <tr class="success">
					      <td><a href="<%=contextPath%>/resume/detailView?id=${communicate.telentsId }" target="_blank">${communicate.trueName }</a></td>
					      <td>${communicate.nextTime.substring(0,19) }</td>
					      <td>${fns:getDictLabel(communicate.classid,'resume_status','')}</td>
					    </tr>
					  </c:forEach>
					  </tbody>
					</table>
				</div>
				<div class="col-sm-4  col-xs-2">
					<table class="table">
					  <caption>面试提醒</caption>
					  <thead>
					    <tr>
					      <th>姓名</th>
					      <th>面试岗位</th>
					      <th>面试公司</th></tr>
					  </thead>
					  <tbody>
					  <c:forEach items="${interviews }" var="interview">
					   <tr class="active">
					      <td><a href="<%=contextPath%>/resume/detailView?id=${interview.recommend.talentsId }" target="_blank">${interview.trueName }</a></td>
					      <td><a href="<%=contextPath%>/demandEnterprise/detailView?id=${interview.recommend.demandId }" target="_blank">${interview.post }</a></td>
					      <td><a href="<%=contextPath%>/company/detailView?id=${interview.recommend.companyId }" target="_blank">${interview.companyName }</a></td>
					    </tr>
					  </c:forEach>
					  </tbody>
					</table>
				</div>
				<div class="col-sm-4  col-xs-2">
					<table class="table">
					  <caption>入职提醒</caption>
					  <thead>
					    <tr>
					      <th>姓名</th>
					      <th>入职岗位</th>
					      <th>入职公司</th>
					      <th>入职时间</th>
					   </tr>
					  </thead>
					  <tbody>
					  <c:forEach items="${offerRecords }" var="offerRecord">
					    <tr class="success">
					      <td><a href="<%=contextPath%>/resume/detailView?id=${offerRecord.recommend.talentsId }" target="_blank">${offerRecord.trueName }</a></td>
					      <td>${offerRecord.inPost }</td>
					      <td><a href="<%=contextPath%>/company/detailView?id=${offerRecord.recommend.companyId }" target="_blank">${offerRecord.companyName }</a></td>
					      <td>${offerRecord.entryDate.substring(0,10) }</td>
					     </tr>
					     </c:forEach>
					  </tbody>
					</table>
				</div>
				</div>
				<div class="row">
				<div class="col-sm-4  col-xs-2">
					<table class="table">
					  <caption>保障期跟踪提醒</caption>
					  <thead>
					    <tr>
					      <th>姓名</th>
					      <th>入职岗位</th>
					      <th>入职公司</th>
					      <th>保障期结束时间</th>
					    </tr>
					  </thead>
					  <tbody>
					  <c:forEach items="${periods }" var="period">
					    <tr class="active">
					      <td><a href="<%=contextPath%>/resume/detailView?id=${period.recommend.talentsId }" target="_blank">${period.trueName }</a></td>
					      <td>${period.inPost }</td>
					      <td><a href="<%=contextPath%>/company/detailView?id=${period.recommend.companyId }" target="_blank">${period.companyName }</a></td>
					      <td>${period.probation.substring(0,10) }</td>
					     </tr>
					     </c:forEach>
					  </tbody>
					</table>
				</div>
				<div class="col-sm-4  col-xs-2">
					<table class="table">
					  <caption>回款提醒</caption>
					  <thead>
					    <tr>
					      <th>合同编号</th>
					      <th>开票金额</th>
					      <th></th>
					     </tr>
					  </thead>
					  <tbody>
					    
					  </tbody>
					</table>
				</div>
				<div class="col-sm-4  col-xs-2">
					<table class="table">
					  <caption>工作记录</caption>
					  <thead>
					    <tr>
					      <th>姓名</th>
					      <th>目前公司</th>
					      <th>目前所在区域</th></tr>
					  </thead>
					  <tbody>
					  <c:forEach items="${workSearchs }" var="workSearch">
					    <tr class="warning">
					      <td>${workSearch.trueName}</td>
					      <td>${workSearch.companyName}</td>
					      <td>${workSearch.area}</td>
					    </tr>
					   </c:forEach>
					  </tbody>
					</table>
				</div>
				</div>
				</div>
			</div>
			<div class="hr-line-dashed"></div>
			<div class="row">
				<div class="col-sm-4  col-xs-2">
				<h3>任务管理</h3>
					<table class="table">
					  <thead>
					    <tr>
					      <th>项目名称</th>
					      <th>开始时间</th>
					      <th>紧急程度</th></tr>
					  </thead>
					  <tbody>
					  <c:forEach items="${tasks }" var="task">
					    <tr class="active">
					      <td><a href="<%=contextPath%>/demandEnterprise/detailView?id=${task.demand.id }"  target="_blank"">${task.companyPosition}</a></td>
					      <td>${task.startDate.substring(0,19) }</td>
					      <td>${fns:getDictLabel(task.urgency,'task_urgency','')}</td>
					    </tr>
					   </c:forEach>
					  </tbody>
					</table>
				</div>
				<div class="col-sm-4  col-xs-2">
				<h3>企业通讯录</h3>
					<table class="table">
					  <thead>
					    <tr>
					      <th>文件名</th>
					      <th>公司名</th>
					      <th>更新年份</th></tr>
					  </thead>
					  <tbody>
					  <c:forEach items="${companyBooks }" var="companyBook">
					    <tr class="active">
					      <td>${companyBook.filePath}</td>
					      <td>${companyBook.companyName}</td>
					      <td>${companyBook.years}</td>
					    </tr>
					   </c:forEach>
					  </tbody>
					</table>
				</div>
				<div class="col-sm-4  col-xs-2">
				<h3>考勤管理</h3>
					<table class="table">
					  <thead>
					    <tr>
					      <th>事假</th>
					      <th>迟到</th>
					      <th>病假</th></tr>
					  </thead>
					  <tbody>
					   
					  </tbody>
					</table>
				</div>
				</div>
			<!-- <div class="row-fluid" style="margin: 20px;">
                检索 
                <h3 style="text-align: center;">业绩排名</h3>
                <div class="ibox-title" style="border-color: white;">
                    <div class="row">
                        <div class="col-sm-12" style="width: 100%;">
                            <div class="form-group form-inline">
                                <span>姓名:</span>
                                <input id="name" type="text" placeholder="请输入姓名" class="input-sm form-control">
                                <span>起止时间:</span>
                                <input id="name" type="text" placeholder="请输入起始时间" class="input-sm form-control"> -- 
                                <input id="name" type="text" placeholder="请输入截止时间" class="input-sm form-control">
                                <a id="find_btn" type="button" class="btn btn-sm btn-primary"> 搜索</a> 
                             </div>
                        </div>
                    </div>
                </div>
                biaogebigin
                <div class="ibox-content" style=" padding-left: 0px; margin-top: 10px;">
                    <div class="jqGrid_wrapper">
                        <table id="table_list"></table>
                        <div id="pager_list"></div>
                    </div>
                </div>
                tableover
            </div> -->
			<%-- <div class="hr-line-dashed"></div>
			<div class="row">
				<div class="col-sm-6">
					<h3>最近录入记录</h3>
					<table class="table">
						<thead>
							<tr>
								<th>编号</th>
								<th>简历姓名</th>
								<th>录入人</th>
								<th>录入时间</th>
							</tr>
						</thead>
						<tbody>
						<template v-for="(resume,index) in datas">
							<tr :class="{'info':index%2 != 0}">
								<td>{{(index+1)}}</td>
								<td>{{resume.trueName}}</td>
								<td>{{resume.createUserName}}</td>
								<td>{{resume.createDate}}</td>
							</tr>
						</template>
						</tbody>
					</table>
				</div>
				<div class="col-sm-6">
					<h3>最近沟通提醒</h3>
					<table class="table">
						<thead>
							<tr>
								<th>编号</th>
								<th>简历人选</th>
								<th>下次沟通时间</th>
								<th>沟通人</th>
								<th>操作</th>
							</tr>
						</thead>
						<tbody>
						<template v-for="(next,index) in nextdatas">
							<tr :class="{'warning':index%2 != 0}">
								<td>{{(index+1)}}</td>
								<td>{{next.trueName}}</td>
								<td>{{next.nextTime}}</td>
								<td>{{next.createUserName}}</td>
								<td><s:hasPermission name="talentsRecommend:add"><a class='btn btn-mini btn-info' title='继续沟通' v-on:click='addchat(next.id)'><i class='icon-plus'></i></a></s:hasPermission></td>
							</tr>
						</template>
						</tbody>
					</table>
				</div>
			</div> --%>
			<div class="hr-line-dashed"></div>
			<!-- <div class="row">
				<div class="col-sm-6">
					<h3>项目跟进情况</h3>
					<table class="table">
						<thead>
							<tr>
								<th>编号</th>
								<th>岗位名称</th>
								<th>发布时间</th>
								<th>跟进状态</th>
							</tr>
						</thead>
						<tbody>
							<tr>
								<td>1</td>
								<td>TB - Monthly</td>
								<td>01/04/2012</td>
								<td>Default</td>
							</tr>
							<tr class="success">
								<td>1</td>
								<td>TB - Monthly</td>
								<td>01/04/2012</td>
								<td>Approved</td>
							</tr>
							<tr class="error">
								<td>2</td>
								<td>TB - Monthly</td>
								<td>02/04/2012</td>
								<td>Declined</td>
							</tr>
							<tr class="warning">
								<td>3</td>
								<td>TB - Monthly</td>
								<td>03/04/2012</td>
								<td>Pending</td>
							</tr>
							<tr class="info">
								<td>4</td>
								<td>TB - Monthly</td>
								<td>04/04/2012</td>
								<td>Call in to confirm</td>
							</tr>
						</tbody>
					</table>
				</div>
				<div class="col-sm-6">
					<h3>推荐记录</h3>
					<table class="table">
						<thead>
							<tr>
								<th>编号</th>
								<th>推荐岗位</th>
								<th>推荐时间</th>
								<th>状态</th>
							</tr>
						</thead>
						<tbody>
							<tr>
								<td>1</td>
								<td>TB - Monthly</td>
								<td>01/04/2012</td>
								<td>Default</td>
							</tr>
							<tr class="success">
								<td>1</td>
								<td>TB - Monthly</td>
								<td>01/04/2012</td>
								<td>Approved</td>
							</tr>
							<tr class="error">
								<td>2</td>
								<td>TB - Monthly</td>
								<td>02/04/2012</td>
								<td>Declined</td>
							</tr>
							<tr class="warning">
								<td>3</td>
								<td>TB - Monthly</td>
								<td>03/04/2012</td>
								<td>Pending</td>
							</tr>
							<tr class="info">
								<td>4</td>
								<td>TB - Monthly</td>
								<td>04/04/2012</td>
								<td>Call in to confirm</td>
							</tr>
						</tbody>
					</table>
				</div>
			</div> -->
		</div>
	</div>
	<script type="text/javascript">
   <%--  $(top.hangge());
        $.jgrid.defaults.styleUI = "Bootstrap";
        $("#table_list").jqGrid({
            url: '<%=contextPath%>/taskCompletion/listData',
            datatype: "json",
            postData: {}, //发送数据
            autowidth: true,
            rownumbers: true,
            shrinkToFit: true,
            mtype: "post",
            rowNum: 10,
            rowList: [10, 20, 30],
            colNames: [
			"id",
			"姓名",
			"部门",
			"offer金额",
			"offer数量",
			"推荐数量",
			"沟通量",
			"初试量",
			"复试量"],
            colModel: [
			{name: "id",index: "id",hidden: true}, 
			{name:"name",index:"name",width:80},
			{name:"depName",index:"depName",width:100},
			{name:"offerMoney",index:"offerMoney",width:100},
			{name:"offerSum",index:"offerSum",width:100},
			{name:"recommandSum",index:"recommandSum",width:100},
			{name:"communicateSum",index:"communicateSum",width:100},
			{name:"firstSum",index:"firstSum",width:100},
			{name:"retestSum",index:"retestSum",width:100}
			],
            height: $(window).height() - 170,
            pager: "#pager_list",
            multiselect: true,//多选按钮
            //multiboxonly: true,
            viewrecords: true,
            hidegrid: false
        });
        //表格自适应高宽
        $(window).bind("resize", function () {
            var b = $(".jqGrid_wrapper").width();
            $("#table_list").setGridWidth(b);
            $("#table_list").setGridHeight($(window).height() - 170);
        })
        $("#table_list").navGrid('#pager_list', {edit: false, add: false, del: false, search: false})
        /* 判断是否有添加权限 */
        //检索
        $("#find_btn").click(function () {
            var name = $("#name").val();
            $("#table_list").jqGrid('setGridParam', {
                postData: {'name': name}, //发送数据
                page: 1
            }).trigger("reloadGrid"); //重新载入
        });
        
    //查看
    function showeye(id) {
        openyem("查看任务完成情况", "<%=contextPath%>/taskCompletion/detailView?id=" + id, 550, 500);
    }
    //删除
    function del(id) {
        swalopen(id, "<%=contextPath%>/taskCompletion/delete");
    };
    //修改
    function showedit(id) {
        openyem("修改任务完成情况", "<%=contextPath%>/taskCompletion/editView?id=" + id, 550, 500);
    }
    //添加
    function showadd(id) {
        openyem("添加任务完成情况", "<%=contextPath%>/taskCompletion/addView", 550, 500);
    } --%>
	<%-- var lists = new Vue({
		  el: '#content',
		  data: {
			  datas:"",
			  nextdatas:"",
		  },mounted:function(){
			  $.ajax({
	                type: 'post',
	                url: '<%=contextPath%>/index/getIndexJson',
	                data:{'count':10}, 
	                datatype:"json",
	                success: function (data) {
	                	lists.datas=data.resumes;
	                	lists.nextdatas=data.demandnext;
	               }
	           });
		    }
		})
	//沟通记录
    function addchat(id) {
    	openyem("添加沟通记录", "<%=contextPath%>/demandCommunicate/addView?talentsId=" + id, 500, 550);
    } --%>
	</script>
</body>

</html>
